function ccR_Monk_3()

	-- Levelling
	if ccrPlayerLevel() >= 10 and ccrPlayerLevel() <= 89 then Monk_WindWalker_1_89() end

end

function Monk_WindWalker_1_89()

	-- Do not interupt Fists of Fury / Spinning Crane Kick
	if ccrPlayerIsChanneling() 
	or ccrPlayerHasBuff(SPINNING_CRANE_KICK) 
	then
		return
	end

	-- Healing Sphere cancelling
	if SpellIsTargeting() == 1 then RunMacroText("/stopspelltarget") end

	-- Talents.lua
		-- 30
		ccR_Monk_Chi_Wave()
		ccR_Monk_Zen_Sphere()
		ccR_Monk_Chi_Burst()
		-- 45
		ccR_Monk_Chi_Brew()
		-- 60
		ccR_Monk_Ring_of_Peace()
		ccR_Monk_Leg_Sweep()
		-- 75
		ccR_Monk_Dampen_Harm()
		ccR_Monk_Diffuse_Magic()

	-- Abilities.lua
	ccR_Monk_Disable()
	ccR_Monk_Spear_Hand_Strike()
	ccR_Monk_Grapple_Weapon()
	ccR_Monk_Touch_of_Karma()
	ccR_Monk_Fortifying_Brew()
	ccR_Monk_Expel_Harm()
	ccR_Monk_Nimble_Brew()
	ccR_Monk_Legacy_of_the_Emperor()
	ccR_Monk_Detox()
	ccR_Monk_Touch_of_Death()
	ccR_Monk_Energizing_Brew()
	ccR_Monk_Tiger_Eye_Brew()
	ccR_Monk_Healing_Sphere()
	ccR_Monk_Storm_Earth_and_Fire()
	ccR_Monk_Legacy_of_the_White_Tiger()

	-- Rotation
	if ccrPlayerHasSpell(SPINNING_CRANE_KICK) then
		-- See how many mobs are within 8 yards of the player
		local vCount = ccrPlayerCount()
		-- Single Target Rotation
		if (ccRS.Auto_AoE and (vCount >= 1 and vCount <= ccRS.Monk_3_SingleTargetCount))
		or (ccrTargetIsBoss() and ccRS.Auto_AoE_Ignore_On_Boss)
		or (not ccRS.Auto_AoE and not ccRS.Manual_AoE)
		then
			-- Ensure Touch of Death is used if available
			if ccrPlayerHasBuff(DEATH_NOTE)
			and not ccrTargetIsEnemyPlayer()		
			and not ccrTargetIsBoss()
			and ccrPlayerIsFacingTarget()
			and SpellIsReady(TOUCH_OF_DEATH)
			then
				ccR_Monk_Touch_of_Death()
			else
				-- Ensure we have Tiger Power
				if not ccrPlayerHasBuff(TIGER_POWER)
				or ccrPlayerHasBuff(COMBO_BREAKER_TIGER_PALM)
				then
					ccR_Monk_Tiger_Palm()
				else
					if ccrPlayerHasSpell(RISING_SUN_KICK) then
						if not onCD(RISING_SUN_KICK) then
							ccR_Monk_Rising_Sun_Kick()
						else
							-- Ensure we use Fists of Fury if chosen
							if ccRS.Monk_3_UseFistsOfFury
							and not onCD(FISTS_OF_FURY)
							and not ccrPlayerIsMoving()
							then
								ccR_Monk_Fists_of_Fury()
							else
								-- Blackout Kick
								ccR_Monk_Blackout_Kick()
							end
						end
					else
						-- Ensure we use Fists of Fury if chosen
						if ccRS.Monk_3_UseFistsOfFury
						and not onCD(FISTS_OF_FURY)
						and not ccrPlayerIsMoving()
						then
							ccR_Monk_Fists_of_Fury()
						else
							-- Blackout Kick
							ccR_Monk_Blackout_Kick()
						end
					end
				end
			end
		return
		end

		-- AoE Rotation
		if (ccRS.Auto_AoE and vCount >= ccRS.Monk_3_AoECount)
		or (not ccRS.Auto_AoE and ccRS.Manual_AoE)
		then
			-- Select a target in melee range for Tiger Palm + Rising Sun Kick
			if not ccrTargetIsWithinMeleeRange() then
				if # tblPGetMeleeEnemies > 0 then
					for x = 0, # tblPGetMeleeEnemies do
						local Obj = tblPGetMeleeEnemies[1]
						if Obj
						and Obj:Exists() 
						and Player:IsFacing(Obj)
						then
							Obj:Target()
							break
						end

					end
				end
			end
			-- Ensure we have Tiger Power
			if not ccrPlayerHasBuff(TIGER_POWER)
			or ccrPlayerHasBuff(COMBO_BREAKER_TIGER_PALM)
			then
				ccR_Monk_Tiger_Palm()
			else				
				-- Use Rising Sun Kick to debuff the group
				if ccrPlayerHasSpell(RISING_SUN_KICK) then
					if not onCD(RISING_SUN_KICK) then
						ccR_Monk_Rising_Sun_Kick()
					else
						ccR_Monk_Spinning_Crane_Kick()
					end
				else
					-- We dont have Rising sun Kick yet, Just do Spinning Crane
					ccR_Monk_Spinning_Crane_Kick()
				end
			end
		end		
	else
		-- No AoE Available | Single Target mode

		-- Ensure we have Tiger Power
		if not ccrPlayerHasBuff(TIGER_POWER)
		or ccrPlayerHasBuff(COMBO_BREAKER_TIGER_PALM)
		then
			ccR_Monk_Tiger_Palm()
		else
			-- Ensure we use Fists of Fury if chosen
			if ccRS.Monk_3_UseFistsOfFury
			and not onCD(FISTS_OF_FURY)
			and not ccrPlayerIsMoving()
			then
				ccR_Monk_Fists_of_Fury()
			else
				-- Blackout Kick
				ccR_Monk_Blackout_Kick()
			end
		end

	end
end

function Monk_WindWalker_90_1h()
	--[[
	#	count	action,conditions
	0	0.00	flask,type=spring_blossoms
	1	0.00	food,type=sea_mist_rice_noodles
	2	0.00	stance,choose=fierce_tiger
	3	0.00	snapshot_stats
	4	0.00	virmens_bite_potion
	Default action list Executed every time the actor is available.
	#	count	action,conditions
	5	1.00	auto_attack
	6	0.00	chi_sphere,if=talent.power_strikes.enabled&buff.chi_sphere.react&chi<4
	7	1.00	virmens_bite_potion,if=buff.bloodlust.react|target.time_to_die<=60
	8	7.95	use_item,name=gloves_of_cushioned_air
	9	3.03	berserking
	A	11.51	chi_brew,if=talent.chi_brew.enabled&chi<=2&(trinket.proc.agility.react|(charges=1&recharge_time<=10)|charges=2|target.time_to_die<charges*10)
	B	17.80	tiger_palm,if=buff.tiger_power.remains<=3
	C	2.56	tigereye_brew,if=buff.tigereye_brew_use.down&buff.tigereye_brew.stack=20
	D	0.00	tigereye_brew,if=buff.tigereye_brew_use.down&trinket.proc.agility.react
	E	21.08	tigereye_brew,if=buff.tigereye_brew_use.down&chi>=2&(trinket.proc.agility.react|trinket.proc.strength.react|buff.tigereye_brew.stack>=15|target.time_to_die<40)&debuff.rising_sun_kick.up&buff.tiger_power.up
	F	6.69	energizing_brew,if=energy.time_to_max>5
	G	1.02	rising_sun_kick,if=debuff.rising_sun_kick.down
	H	0.00	tiger_palm,if=buff.tiger_power.down&debuff.rising_sun_kick.remains>1&energy.time_to_max>1
	I	3.02	invoke_xuen,if=talent.invoke_xuen.enabled
	J	0.00	run_action_list,name=aoe,if=active_enemies>=3
	K	0.00	run_action_list,name=single_target,if=active_enemies<3
	actions.single_target
	#	count	action,conditions
	R	49.69	rising_sun_kick
	S	12.62	fists_of_fury,if=buff.energizing_brew.down&energy.time_to_max>4&buff.tiger_power.remains>4
	T	27.32	chi_wave,if=talent.chi_wave.enabled&energy.time_to_max>2
	U	0.00	chi_burst,if=talent.chi_burst.enabled&energy.time_to_max>2
	V	0.00	zen_sphere,cycle_targets=1,if=talent.zen_sphere.enabled&energy.time_to_max>2&!dot.zen_sphere.ticking
	W	17.99	blackout_kick,if=buff.combo_breaker_bok.react
	X	15.54	tiger_palm,if=buff.combo_breaker_tp.react&(buff.combo_breaker_tp.remains<=2|energy.time_to_max>=2)
	Y	155.94	jab,if=chi.max-chi>=2
	Z	89.73	blackout_kick,if=energy+energy.regen*cooldown.rising_sun_kick.remains>=40
	]]
end

function Monk_WindWalker_90_2h()
	--[[
	0	0.00	flask,type=spring_blossoms
	1	0.00	food,type=sea_mist_rice_noodles
	2	0.00	stance,choose=fierce_tiger
	3	0.00	snapshot_stats
	4	0.00	virmens_bite_potion
	Default action list Executed every time the actor is available.
	#	count	action,conditions
	5	1.00	auto_attack
	6	0.00	chi_sphere,if=talent.power_strikes.enabled&buff.chi_sphere.react&chi<4
	7	1.00	virmens_bite_potion,if=buff.bloodlust.react|target.time_to_die<=60
	8	7.95	use_item,name=grips_of_vampiric_cruelty
	9	3.03	berserking
	A	11.52	chi_brew,if=talent.chi_brew.enabled&chi<=2&(trinket.proc.agility.react|(charges=1&recharge_time<=10)|charges=2|target.time_to_die<charges*10)
	B	17.80	tiger_palm,if=buff.tiger_power.remains<=3
	C	2.62	tigereye_brew,if=buff.tigereye_brew_use.down&buff.tigereye_brew.stack=20
	D	0.00	tigereye_brew,if=buff.tigereye_brew_use.down&trinket.proc.agility.react
	E	21.00	tigereye_brew,if=buff.tigereye_brew_use.down&chi>=2&(trinket.proc.agility.react|trinket.proc.strength.react|buff.tigereye_brew.stack>=15|target.time_to_die<40)&debuff.rising_sun_kick.up&buff.tiger_power.up
	F	6.72	energizing_brew,if=energy.time_to_max>5
	G	1.02	rising_sun_kick,if=debuff.rising_sun_kick.down
	H	0.00	tiger_palm,if=buff.tiger_power.down&debuff.rising_sun_kick.remains>1&energy.time_to_max>1
	I	3.02	invoke_xuen,if=talent.invoke_xuen.enabled
	J	0.00	run_action_list,name=aoe,if=active_enemies>=3
	K	0.00	run_action_list,name=single_target,if=active_enemies<3
	actions.single_target
	#	count	action,conditions
	R	49.68	rising_sun_kick
	S	12.67	fists_of_fury,if=buff.energizing_brew.down&energy.time_to_max>4&buff.tiger_power.remains>4
	T	27.35	chi_wave,if=talent.chi_wave.enabled&energy.time_to_max>2
	U	0.00	chi_burst,if=talent.chi_burst.enabled&energy.time_to_max>2
	V	0.00	zen_sphere,cycle_targets=1,if=talent.zen_sphere.enabled&energy.time_to_max>2&!dot.zen_sphere.ticking
	W	17.94	blackout_kick,if=buff.combo_breaker_bok.react
	X	15.52	tiger_palm,if=buff.combo_breaker_tp.react&(buff.combo_breaker_tp.remains<=2|energy.time_to_max>=2)
	Y	155.33	jab,if=chi.max-chi>=2
	Z	89.06	blackout_kick,if=energy+energy.regen*cooldown.rising_sun_kick.remains>=40
	]]
end